using System;

namespace Admin.NET.Application;

public class RetrieveOutput
{
	public long Id { get; set; }

	/// <summary>
	/// 周期
	/// </summary>
	public string Cycle { get; set; }

	/// <summary>
	/// 表号
	/// </summary>
	public string Sn { get; set; }

	/// <summary>
	/// 电表名称
	/// </summary>
	public string Name { get; set; }

	/// <summary>
	/// 0单费率，1复费率
	/// </summary>
	public int Type { get; set; }

	public string TypeName
	{
		get
		{
			if (Type == 0)
			{
				return "单费率";
			}
			if (Type == 1)
			{
				return "复费率";
			}
			return "其他";
		}
	}

	/// <summary>
	/// 单费率单价 元/度
	/// </summary>
	public decimal? Price { get; set; }

	/// <summary>
	/// 尖 单价 元/度
	/// </summary>
	public decimal? SharpPrice { get; set; }

	/// <summary>
	/// 峰 单价 元/度
	/// </summary>
	public decimal? PeakPrice { get; set; }

	/// <summary>
	/// 平 单价 元/度
	/// </summary>
	public decimal? FlatPrice { get; set; }

	/// <summary>
	/// 谷 单价 元/度
	/// </summary>
	public decimal? ValleyPrice { get; set; }

	public string PriceName
	{
		get
		{
			if (Type == 0)
			{
				return Price.ToString();
			}
			if (Type == 1)
			{
				return $"{SharpPrice}丨{PeakPrice}丨{FlatPrice}丨{ValleyPrice}";
			}
			return "";
		}
	}

	/// <summary>
	/// 退的费用（元）（退钱到房间余额）
	/// </summary>
	public decimal? RefundPrice { get; set; }

	/// <summary>
	/// 补的费用（元）（从房间余额抵扣）
	/// </summary>
	public decimal? RepairPrice { get; set; }

	/// <summary>
	/// 是否生效，0待生效，1已生效,2计算中
	/// </summary>
	public int IsTakeEffect { get; set; }

	public long RoomId { get; set; }

	public string? RoomName { get; set; }

	public long? BuildingId { get; set; }

	public string? BuildingName { get; set; }

	public DateTime? CreateTime { get; set; }
}
